//
//  NSString+JwTime.h
//  JwPack
//
//  Created by 陈警卫 on 2024-07-17.
//

#import <Foundation/Foundation.h>

@interface NSString (JwTime)

/// 时间戳转时钟 00:00:00
- (NSString *)jw_clockString;

/// 时间戳转时钟 00:00/00:00:00
- (NSString *)jw_clockFitsString;

/// format字符串转时间
/// format默认 "yyyy-MM-dd HH:mm:ss"
- (NSDate *)jw_dateWithFormat:(NSString *)format;

/// format字符串转时间，可指定时区和本地化设置
/// format默认 "yyyy-MM-dd HH:mm:ss"
- (NSDate *)jw_dateWithFormat:(NSString *)format timeZone:(NSTimeZone *)timeZone locale:(NSLocale *)locale;

/// 时间戳转Date
- (NSDate *)jw_stampToDate;

/// 时间戳转format字符串
/// format默认 "yyyy-MM-dd HH:mm:ss"
- (NSString *)jw_stampToFormat:(NSString *)format;

/// 时间戳
+ (NSString *)jw_timestamp;

/// 时钟戳
+ (NSString *)jw_dateFmtString;

@end

